<?php
namespace app\index\controller;

use think\Controller;
use think\Db;

class Index extends Controller
{

    /**
     * 改变键的大小写测试
     */
    public function arrayChangeKeyCaseTest($toupper)
    {
        $arr = array(
            "one" => 11,
            "One" => 22,
            3 => 44,
            "TAO" => 55,
            "tt" => 66
        );
        dump(array_change_key_case($arr, CASE_UPPER));
        dump(array_change_key_case($arr, CASE_LOWER));
    }

    /**
     * 把一个数组分为多个数组
     */
    public function arrrayChunkTest()
    {
        $arr = array(
            "one" => 1,
            2 => 2,
            "three" => 3,
            4 => 4,
            "five" => 5
        );
        dump(array_chunk($arr, 2, true));
        dump(array_chunk($arr, 2, FALSE));
    }
    
    
    public function test(){
        dump("test");
    }
}
